'use strict';
const db = uniCloud.database()
exports.main = async (event, context) => {
	// let res = await db.collection("users").doc("66bc1ffd466d415ce37976e4").get(); //根据_id 查询
	// let res = await db.collection("users").limit(5).get(); //limt 限制查询的条数
	// let res = await db.collection("users").limit(5).skip(1).get(); //skip 跳过的条数
	// let res = await db.collection("users").orderBy("_id", "desc").get(); //orderBy 排序 默认asc(升序) desc(降序)
	let res = await db.collection("users").field({
		"name": true
	}).get(); //field 只查询需要的字段
	return res
};